<template>
  <div>
    <div>
      <img height = '20' src = "../assets/AlarmIcon.png" v-show = "alertId === 230">
      <img height = '25' src = "../assets/menuIcon.png" v-show = "alertId === 0">
      {{alertId | alertText}}
    </div>
  </div>
</template>

<script>
  import AlertData from '../utils/echo-alert-data'

  export default {
    data () {
      return {
        activeAlert: AlertData.activeAlert,
        alertId: 0
      }
    },
    watch: {
      'activeAlert.length': function () {
        let len = this.activeAlert.length
        if (len > 0) {
          this.alertId = this.activeAlert[len - 1].alertId
        } else {
          this.alertId = 0
        }
      }
    }
  }
</script>

<style>
</style>
